// 初始化Echarts对象
var mCharts = echarts.init(document.querySelector('.line'));
var option;
option = {
    tooltip: {
        trigger: 'axis',
    },
    xAxis: {
        boundaryGap: false,
        axisLabel: {
            interval: 0,
            textStyle: {   //textStyle里面写x轴下的字体的样式
                color: '#41454D',
                fontSize: 8,
                fontFamily: 'Microsoft YaHei',
                fontweight: 400,
            }
        },
        axisLine: {
            show: true,
            lineStyle: {
                color: '#C2C5CC',
                width: 1,
            }
        },
        // 是否显示坐标轴刻度。
        axisTick: {
            show: false
        },
        type: 'category',
        data: [
            '周一',
            '周二',
            '周三',
            '周四',
            '周五',
            '周六',
            '周日'
        ]
    },
    yAxis: {
        type: 'value',
        axisLine: {
            show: true,
            lineStyle: {
                color: '#C2C5CC',
                width: 1,
            }
        },
        axisLabel: {
            textStyle: {   //textStyle里面写x轴下的字体的样式
                color: '#41454D',
                fontSize: 7,
                fontFamily: 'Microsoft YaHei',
                fontweight: 400,
            }
        },
    },
    series: [
        {
            type: 'line',
            lineStyle: {
                color: '#86C4F2'
            },
            areaStyle: {
                color: '#D1E8E5',
            },
            data: [2.2, 4, 2, 5, 1.5, 6.1, 10.2]
        },
        {
            type: 'line',
            lineStyle: {
                color: '#9DC95A'
            },
            areaStyle: {
                color: '#EFF8E6',
            },
            data: [4.1, 3, 5.8, 7.9, 6, 7, 5.5]
        }
    ],
    grid: {
        left: 20,
        bottom: 20,
        right: 20,
        top: 20
    }
};
//将配置项设置给ECharts实例对象
mCharts.setOption(option);